package com.example.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.DishData;
import com.example.entity.Orders;
import com.example.entity.OrdersList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrdersListDao extends BaseMapper<OrdersList> {
    @Select("select dish_id,sum(number) as count from orders_list group by dish_id ORDER BY count DESC LIMIT 10")
    public List<DishData> getByBuyNumber();

}
